<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        test01();  // test01-2
        var test01;
        function test01(){  // 覆盖var test01
            console.log("test01-1");
        }
        function test01(){  // 覆盖前一个函数
            console.log("test01-2");
        }
        test01();  // test01-2

        console.log(test02);
        // test02();  //匿名函数不提升
        var test02 = function(){
            console.log("test02");
        }
    </script>
</body>
</html>